<{if isset($citylist)}>
<div class="list-group">
    <a href="javascript:void(0);" data-id="0"  class="list-group-item city_return"><span class="fa fa-chevron-left"></span></a>
    <{foreach $citylist as $v}>
    <a href="javascript:void(0);" data-id="<{$v["id"]}>"  class="jp_citylist cursor list-group-item <{if isset($tenant["city_id"])&&$tenant["city_id"]&&intval($v["id"])===intval($tenant["city_id"])}>active<{/if}>">
        <{$v["city"]}>
  </a>
    <{/foreach}>

</div>
<script>
    $(".city_return").click(function(){
        $(".jplocalcitylist").fadeOut("normal",function(){
            $(".jplocalprovincelist").fadeIn();
        });
        
        
    });
    $("a.jp_citylist").click(function(){
        var city_id=$(this).data("id");
        var city=$(this).html();
        $(".jpsearchlabelcity").html(city);
        var jplabelcity=$(".jplabelcity");
        if(jplabelcity.length>0){
          jplabelcity.html(city);
          $.post("<{echo Common::RewriteUrl("Tenantadmin","public_ajax_updateCity");}>",{"city":city,"tid":<{$tenant["id"]}>});
        }
        $("input[name='city_id']").val(city_id);
         $.post("<{echo Common::RewriteUrl("Tenantadmin","public_ajax_getarealist");}>",{"city_id":city_id},function(html){
             $(".jplocalarealist").html(html);
        
             $(".jplocalcitylist").fadeOut("normal",function(){
                $(".jplocalarealist").fadeIn();
             });
         });
    });
</script>
<{/if}>